package oo.shootgame;

public class Bee extends Plane implements Award{
	private int awardType;
	public int getType(){
		return awardType;
	}
	private int xspeed=1;
	private int yspeed=2;
	public Bee(){
		life=0;
		image=ShootGame.bee;
		width=image.getWidth()-10;
		height=image.getHeight()-10;
		x=(int)(Math.random()*(ShootGame.WIDTH-width));
		y=-height;
		awardType=(int)(Math.random()*2);
	}
	public void step(){
		x+=xspeed;
		y+=yspeed;
		if(x>ShootGame.WIDTH-width){
			xspeed=-1;
		}
		if(x<=0){
			xspeed=1;
		}
	}
	public Bullet beeshoot(){
		Bullet bb=new Bullet(x+width/2,y+height+20);
		return bb;
	}
	
}
